<!DOCTYPE html>
<title>Test that Audio("url") constructor loads the specified resource.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
    var audioFile = "content/test.oga";
    var audio = new Audio(audioFile);

    audio.onloadstart = t.step_func(function () {
        var url = audio.currentSrc;
        assert_equals(url.substr(url.lastIndexOf("/media/")+7), audioFile);
    });

    audio.oncanplaythrough = t.step_func_done();
});
</script>